import Mock from 'mockjs';
import { orderDate, tableData, monthOrderDate, weekOrderDate, personalData } from './homeData';

// 请求首页表格数据
Mock.mock('/system/home/tableList', 'get', (req, res) => {
  return {
    status: 200,
    message: 'Success',
    data: tableData,
  };
});


// 请求首页订单数据
Mock.mock('/system/home/orderList', 'get', (req, res) => {
  return {
    status: 200,
    message: 'Success',
    data: orderDate,
  };
});

// 请求首页月份数据
Mock.mock('/system/home/monthDataList', 'get', (req, res) => {
  return {
    status: 200,
    message: 'Success',
    data: monthOrderDate['array'],
  };
})

// 请求首页一周数据
Mock.mock('/system/home/weekDataList', 'get', (req, res) => {
  return {
    status: 200,
    message: 'Success',
    data: weekOrderDate['array'],
  };
})

// 请求首页一个人数据
Mock.mock('/system/home/personalData', 'get', (req, res) => {
  return {
    status: 200,
    message: 'Success',
    data: personalData['array'],
  };
})